package com.wit.witmg.api;


import com.wit.witmg.service.ITSoftwareService;
import com.wit.witmg.service.ITSystemcertService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 证书信息表 前端控制器
 * </p>
 *
 * @author bob
 * @since 2025-09-19
 */
@RestController
@RequestMapping("systemcert")
@Api(tags = "体系证书管理")
public class SystemcertController {
    @Resource
    private ITSystemcertService service;

    @ApiOperation("添加/修改")
    @PostMapping("create")
    public Object create(HttpServletRequest request,
                         @RequestParam("json") String json,
                         @RequestParam(value = "pdf",required = false) MultipartFile pdf,
                         @RequestParam(value = "file",required = false) MultipartFile file) {
        return service.add(request,json,pdf,file);
    }

    @ApiOperation("获取")
    @PostMapping("get")
    public Object get(HttpServletRequest request,
                      @RequestParam(value = "pro",required = false) String pro,
                      @RequestParam(value = "na",required = false) String na,
                      @RequestParam(value = "nu",required = false) String nu,
                      @RequestParam(value = "tp",required = false) String tp)
    {
        return service.get(request,pro,na,nu,tp);
    }
}
